<?php

declare(strict_types=1);

namespace DreamCat\StateMachine\Factory;

use DreamCat\StateMachine\Error\MachineDataNotFoundException;
use DreamCat\StateMachine\Popo\MachineData;

/**
 * 状态机工厂
 * @author vijay
 */
interface MachineFactory
{
    /**
     * 通过状态机唯一标识生成状态机
     * @param string $machineId 状态机唯一标识比如病例编号或病例ID
     * @return MachineData 状态机数据
     * @throws MachineDataNotFoundException
     */
    public function buildMachineFromId(string $machineId): MachineData;
}

# end of file
